/**
 * 加入一个回调git config --global push.autoSetupRemote true
 * @brief 返回处理相应的URC事件 
*/
#ifndef T_AT_URC_ETGP_H
#define T_AT_URC_ETGP_H
#include "stdio.h"
#include "stdint.h"
#include "t_at.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef uint8_t (*urc_callback)(void *uarg, uint8_t *dataBuf, uint8_t len, uint8_t *cmd_UrcString);

typedef struct
{
    char *name_key_word;
    urc_callback callback_func;
}rev_urc_etgp_t; /*recevice & URC recevice events groups*/

extern rbuf urc_rbuf;
#define EXT_ETGP_CMD(name_key_word,json_cb_fn)  {name_key_word,json_cb_fn}

void at_urc_thread_init(t_at_t * at_device_t);
void urc_handle_event_no_RTOS(t_at_t *at_device_t); 
void urc_ringbuffer_add(t_at_t *me, rbuf *urc_rbuf);
void urc_thread_push_ISR(t_at_t *me, uint8_t *buffer, uint16_t len); // 压入数据到URC环形缓冲区
uint8_t urc_handle_command_callback(void *arg,const char *cmd_buffer, uint16_t data_len);

#ifdef __cplusplus
}
#endif

#endif